//
//  GlobalDefine.h
//  coldjoke-ios-client
//
//  Created by lai on 13-1-25.
//
//


//--基本URL--
#define BASIC_URL @"http://lengxiaohua.com"
#define BASIC_API_URL @"http://lengxiaohua.com/lengxiaohuaapi"

//--splash图片url--
#define splashUrlImage @"http://192.168.37.129/a.php"

#define COMPLEMENTED_URL(THEURL) [NSString stringWithFormat:@"%@%@",BASIC_URL,THEURL]
//--joke相关url--
#define JOKE_SHARE_URL(JOKEID) [NSString stringWithFormat:@"%@/p/joke/%@",BASIC_URL,JOKEID]
#define JOKE_INIT_TEXTONLY_URL(SORT,NUM,INDEX) [NSString stringWithFormat:@"%@/joke?action=getJokes&sort=%@&start=%d&limit=%d&type=text",BASIC_API_URL,SORT,NUM,INDEX];
#define JOKE_INIT_NOTEXTONLY_URL(SORT,NUM,INDEX) [NSString stringWithFormat:@"%@/joke?action=getJokes&sort=%@&start=%d&limit=%d&type=text%%7Cimage",BASIC_API_URL,SORT,NUM,INDEX];
#define JOKE_LIKE_URL(JOKEID) [NSString stringWithFormat:@"%@/profile?action=isJokeLiked&joke_id=%@",BASIC_API_URL,JOKEID]
#define JOKE_UNLIKE_URL(JOKEID) [NSString stringWithFormat:@"%@/profile?action=isJokeUnliked&joke_id=%@",BASIC_API_URL,JOKEID]
#define JOKE_REPLY_URL(JOKEID) [NSString stringWithFormat:@"%@/comment?action=getOneJokeComments&joke_id=%@&data_type=json",BASIC_API_URL,JOKEID]
#define JOKE_WHETHER_LIKED_URL [NSString stringWithFormat:@"%@/log",BASIC_API_URL]
#define JOKE_SEND_COMMENT [NSString stringWithFormat:@"%@/comment",BASIC_API_URL]

//--judeg相关url--
#define JUDGE_FIRST_URL [NSString stringWithFormat:@"%@/judge?action=getJoke",BASIC_API_URL]
#define JUDGE_NO_FIRST_URL(JUDGEID) [NSString stringWithFormat:@"%@/judge?action=getJoke&currentjokeid=%d",BASIC_API_URL,JUDGEID]
#define JUDGE_ACTION(JOKEID,OPINION,CONTETN) [NSString stringWithFormat:@"%@/judge?action=judge&Jokeid=%d&opinion=%@&content=%@",BASIC_API_URL,JOKEID,OPINION,CONTETN]

//--topic相关url--
#define TOPIC_SHAREURL(TOPICID)  [NSString stringWithFormat:@"%@/p/gather/%@",BASIC_URL,TOPICID]
#define TOPIC_INITWITHSORT_URL(SORT) [NSString stringWithFormat:@"%@/gather?action=getGathers&type=%@",BASIC_API_URL,SORT]
#define TOPIC_WITHSORT_URL(SORT,NUMBER,INDEX) [NSString stringWithFormat:@"%@/gather?action=getGathers&type=%@&start=%d&limit=%d",BASIC_API_URL,SORT,NUMBER,INDEX]
#define TOPIC_DETAILSINGEL_URL(TOPICID) [NSString stringWithFormat:@"%@/gather?action=getOneGather&Gatherid=%@",BASIC_API_URL,TOPICID]
#define TOPIC_DETAIL_REPLY_URL(TOPICID) [NSString stringWithFormat:@"%@/gather-comment?action=getOneGatherComments&gather_id=%@&data_type=json",BASIC_API_URL,TOPICID]
#define TOPIC_DETAIL_SEND_REPLY_URL [NSString stringWithFormat:@"%@/gather-comment",BASIC_API_URL]

//--登录注册相关url--
#define REGISTER_URL [NSString stringWithFormat:@"%@/register",BASIC_API_URL]
#define LOGIN_URL(EMAIL,PASSWORD,REMEMBER) [NSString stringWithFormat:@"%@/profile?action=login&email=%@&password=%@&rememberme=%@",BASIC_API_URL,EMAIL,PASSWORD,REMEMBER]
//--更新app的url--
#define APP_UPDATE_URL [NSString stringWithFormat:@"%@/app?client=iphone&action=getVersion",BASIC_API_URL]

//--发表笑话的url--
#define POST_NO_IMAGE [NSString stringWithFormat:@"%@/joke",BASIC_API_URL]
#define POST_WITH_IMAGE [NSString stringWithFormat:@"%@/insert-image-joke",BASIC_API_URL]

